<form class="validate" action="{$BASE_PATH}" method='post'>
	{$form->getElement('application')->render()}
	{$form->getElement('controller')->render()}
	{$form->getElement('method')->render()}
	{$form->getElement('email[aba]')->render()}
	{$form->getElement('pessoa[id_pessoa]')->render()}
	{$form->getElement('pessoa[emails][id_email]')->render()}
	<div class="control-group">
		{$form->getElement('pessoa[emails][ds_email]')->getLabel()->render()}
		<div class="controls">
			{$form->getElement('pessoa[emails][ds_email]')->render()}
		</div>
	</div>
	{foreach from=$emails key=k item=i}
		<ul class="listOptions">
			<li>
				<p><strong>{$i->getEmail()}</strong></p>
				<span class="actLnk fright">
	                {$Action->getClass('\Helper\Action\Admin\Email')->deletar($i)}
	            </span>
			</li>
		</ul>
	{/foreach}
	<div class="form-actions">
		{$form->getElement('salvar')->render()}
	</div>
</form>

{literal}
<script type="text/javascript">
	$(document).ready(function(){
		$(".deletar").on('click', function(){
			var obj = this;
			$.ajax({
	            type: "POST",
	            url: BASE_PATH+'admin/email/deletarEmail/idemail/'+this.id,
	            success: function (txt) {
	            	$(obj).parents('li').remove();
	            }
	        });
		});
	});
</script>
{/literal}